1. Field of the Invention
The present invention relates to a flash memory, and, more particularly, to an input/output control method and apparatus optimized for a flash memory that can improve the performance of the flash memory.
2. Description of the Related Art
Generally, an operating system (OS) uses a file system in order to manage data. Here, a file system has a logical structure that should be first constructed to manage a file. For example, a “format” command in Microsoft Windows refers to a process of creating and initializing such a file system. Only after the file system is created, a user can store or delete a file.
Diverse kinds of file systems exist depending on operation systems. For example, in the Windows series operating systems, File Allocation Table (FAT) file systems and the New Technology File System (NTFS) exist, while in the Unix/Linux series of operating systems, the Unix File System (UFS), Extended 2 (EXT2) file system, Extended 3 (EXT3) file system, and Journaled File System (JFS) exist.
A flash memory is a nonvolatile memory that can electrically delete and write data. Since the flash memory is light and durable against shock with low power consumption, it has been mainly used as a storage medium of portable information devices such as cellular phones, PDAs, digital cameras, and others. However, in order to write data in the flash memory, which is a kind of EEPROM, a delete operation should precede the write operation, and generally a delete unit is larger than a write unit. This feature of the flash memory makes it difficult to utilize a file system for a general hard disk as is the case when using the flash memory as an auxiliary storage device.
Accordingly, in order to conceal such limitations and to use the flash memory as a block device such as a hard disk, a flash translation layer, which is middleware between the file system and the flash memory, has been used. The flash translation layer maintains mapping information between a logical position of a virtual block device and a physical position of the flash memory, and when a write/read operation is requested with respect to a specified logical position, it translates the logical position into a physical position using the mapping information. Particularly, if a write operation for changing data in the logical position is requested, the flash translation layer electrically erases the physical position that corresponds to the logical position, and then performs rewriting or remapping of the logical position onto another physical position.
However, since the conventional file system and I/O scheduler are not optimized for the operation of the flash translation layer but are optimized for the hard disk, the performance of the flash memory deteriorates even if the flash translation layer is used. Particularly, when the flash memory performs a random write operation, its write efficiency deteriorates.